#ifndef CLICKBTN_H
#define CLICKBTN_H
#include "global.h"
#include <QPushButton>
#include <QMouseEvent>
#include <QEvent>
class ClickedBtn :public QPushButton
{
    Q_OBJECT
public:
    explicit ClickedBtn(QWidget * parent = nullptr);
    ~ClickedBtn();

    void SetState(QString nomal, QString hover, QString press);

    virtual void enterEvent(QEvent *event) override; // 鼠标进入
    virtual void leaveEvent(QEvent *event) override;// 鼠标离开
    virtual void mousePressEvent(QMouseEvent *event) override; // 鼠标按下
    virtual void mouseReleaseEvent(QMouseEvent *event) override; // 鼠标释放
private:
    QString _normal;
    QString _hover;
    QString _press;
};

#endif // CLICKBTN_H
